Skip to content

[WIP] Why CS0236 #47119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2025
Merged

[WIP] Why CS0236 #47119

merged 4 commits into from
Jul 15, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 7, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

[Enter feedback here]
I mean Why Compiler will report this error . What happened in Compiler when this error occurs?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Fixes #24369.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/csharp/misc/cs0236.md docs/csharp/misc/cs0236

@BillWagner
Copy link
Member

@copilot Can you start working on this again?

Copy link
Contributor Author

Copilot AI commented Jul 8, 2025

@copilot Can you start working on this again?

I've enhanced the CS0236 documentation to address the original issue. The documentation now explains why the compiler reports this error, including the underlying reasons about field initialization order and object construction phases. See commit 0c88707.

@dotnet-policy-service dotnet-policy-service bot added okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. dotnet-csharp/svc csharp-errors-warnings/subsvc labels Jul 8, 2025
Copilot finished work on behalf of BillWagner July 8, 2025 14:03
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start, but there are some errors and corrections to make.

@BillWagner
Copy link
Member

@copilot Please continue working on this issue

@BillWagner
Copy link
Member

@copilot Please start working on this again

@BillWagner
Copy link
Member

@copilot Can you start working on this again?

@BillWagner
Copy link
Member

@copilot Can you start working on this again?

Copy link
Contributor Author

Copilot AI commented Jul 10, 2025

This is a great start, but there are some errors and corrections to make.

Addressed the errors and corrections mentioned in the review feedback. Fixed the inaccurate statements about field initialization order and the rule's purpose. See commit 70fe1de.

@copilot Can you start working on this again?

I've continued working on the issue and addressed the review feedback about inaccuracies in the CS0236 documentation. The corrections have been made in commit 70fe1de.

Copilot finished work on behalf of BillWagner July 10, 2025 20:30
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final change, and this is ready.

@Copilot Copilot AI requested a review from BillWagner July 14, 2025 18:23
Copilot finished work on behalf of BillWagner July 14, 2025 18:23
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. I'll mark it ready for final review.

@BillWagner BillWagner marked this pull request as ready for review July 14, 2025 18:26
@BillWagner BillWagner requested a review from a team as a code owner July 14, 2025 18:26
@BillWagner BillWagner requested a review from IEvangelist July 14, 2025 18:26
@IEvangelist IEvangelist merged commit aae38d8 into main Jul 15, 2025
10 checks passed
@IEvangelist IEvangelist deleted the copilot/fix-24369 branch July 15, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csharp-errors-warnings/subsvc dotnet-csharp/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why CS0236
3 participants